<extend name="Public:common" />
<block name="content">
    <!--/sidebar-->
    <div class="main-wrap">
        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="/jscss/admin/design/">首页</a><span class="crumb-step">&gt;</span><a class="crumb-name" href="__URL__/index">客服管理</a><span class="crumb-step">&gt;</span>></div>
        </div>
        <div class="result-wrap">
            <div class="result-content">
                    <div class="result-list">
                        <a href="__URL__/insert"> <i class="icon-font"></i>
                            新增
                        </a>
                    </div>
                    <table class="insert-tab" width="100%">
                        <tbody>
 
                    <foreach name="list[0]" item="vo">

                         <tr>
                            <th width="120"><i class="require-red">*</i><{$vo.name}>：</th>
                            <td>
                                <input class="common-text required" onblur="doblur(this,<{$vo['id']}>)" required name="sort"  size="50" value="<{$vo.content}>" type="text">
                            </td>
                            <td><a href="javascript:del(<{$vo.id}>)">删除</a>
                        </tr>
                    </foreach>
                    <foreach name="list[1]" item="vo">
                        <tr>
                            <th width="120"><i class="require-red">*</i><{$vo.name}>：</th>
                            <td>
                                <input class="common-text required" onblur="doblur(this,<{$vo['id']}>)" required name="url"  size="50" value="<{$vo.content}>" type="text">
                            </td>
                            <td><a href="javascript:del(<{$vo.id}>)">删除</a>
                        </tr>
                    </foreach>
                    <foreach name="list[2]" item="vo">
                        <tr>
                            <th width="120"><i class="require-red">*</i><{$vo.name}>：</th>
                            <td>
                                <input class="common-text required" onblur="doblur(this,<{$vo['id']}>)" required name="url"  size="50" value="<{$vo.content}>" type="text">
                            </td>
                            <td><a href="javascript:del(<{$vo.id}>)">删除</a>
                        </tr>
                    </foreach>
                   <foreach name="list[3]" item="vo">
                        <tr>
                            <th width="120"><i class="require-red">*</i><{$vo.name}>：</th>
                            <td>
                                <input class="common-text required" onblur="doblur(this,<{$vo['id']}>)" required name="url"  size="50" value="<{$vo.content}>" type="text">
                            </td>
                            <td><a href="javascript:del(<{$vo.id}>)">删除</a>
                        </tr>
                    </foreach>
                    <foreach name="list[4]" item="vo">
                        <tr>
                            <th width="120"><i class="require-red">*</i><{$vo.name}>：</th>
                            <td>
                                <input class="common-text required" onblur="doblur(this,<{$vo['id']}>)" required name="url"  size="50" value="<{$vo.content}>" type="text">
                            </td>
                            <td><a href="javascript:del(<{$vo.id}>)">删除</a>
                        </tr>
                    </foreach>                   
                     <foreach name="list[5]" item="vo">
                        <tr>
                            <th width="120"><i class="require-red">*</i><{$vo.name}>：</th>
                            <td>
                                <input class="common-text required" onblur="doblur(this,<{$vo['id']}>)" required name="url"  size="50" value="<{$vo.content}>" type="text">
                            </td>
                            <td><a href="javascript:del(<{$vo.id}>)">删除</a>
                        </tr>
                    </foreach>
                        </tbody>
                    </table>
            </div>
        </div>

    </div>
    <!--/main-->
    <script>
function doblur(s,id){
    var yh = $.trim($(s).val()); 
         $.MsgBox.Confirm("修改提示", "确定继续吗？温馨提示", function() { 
        $.post('__URL__/sort', {id:id,content:yh}, function(data) {
            $.MsgBox.Alert("消息", data);
            location.reload();
            });
            })
        }


        function del(id){
            //删除 商品 漂亮的提示信息
            $.MsgBox.Confirm("删除提示", "执行后将无法恢复，确定继续吗？温馨提示", function() { 
                //发送 当前商品的id 和当前用户帐号
                $.post("__URL__/delete",{'sid':id},function(data){
                     $.MsgBox.Alert("消息", data);
                    location.reload();
                });
            })
        }
    </script>
</block>